﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Manage.aspx.cs" Inherits="Admin.Material.Manage" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link href="/Themes/Default/Css/Style.css" rel="stylesheet" type="text/css" />
    <script src="/Jscript/CheckBox.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="/Components/EasyUI/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="/Components/EasyUI/themes/icon.css" />
    <script src="/Jscript/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script src="/Components/EasyUI/jquery.easyui.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function myfunction() {
            $("select[name$='txtSearchFormName']").combobox();
            $("select[name$='txtFormName']").combobox();
        });
        function CheckFormContent() {
            $("input:[name$='hiddenSearchName']").eq(0).val($('#txtSearchFormName').combobox('getValue'));
        };
    </script>
    <title>相关资料名称管理</title>
</head>
<body>
    <form id="form1" runat="server">
    <table style="width: 900px;" cellpadding="2" cellspacing="1" border="0">
        <tr>
            <td>
                <table cellspacing="0" cellpadding="0" width="100%" border="1" bordercolordark="white"
                    bordercolorlight="#b7c9e9" style="padding-left: 3px">
                    <tr>
                        <td height="25" align="right" width="120px">
                            相关资料名称 ：
                        </td>
                        <td height="25" align="left" width="330px">
                            <select id="txtFormName" class="easyui-combobox" name="state" style="width: 200px;"
                                runat="server">
                                
                            </select>
                        </td>
                        <td height="25" align="right" width="120px">
                            附件 ：
                        </td>
                        <td height="25" align="left" width="330px">
                            <asp:FileUpload ID="FileUpload1" runat="server" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td class="tdbg" align="center" valign="bottom">
                <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" class="inputbutton"
                    onmouseover="this.className='inputbutton_hover'" onmouseout="this.className='inputbutton'">
                </asp:Button>
                <input type="button" value="关闭" class="inputbutton" onmouseover="this.className='inputbutton_hover'"
                    onmouseout="this.className='inputbutton'" onclick="javascript:window.parent.$('#Div1').dialog('close');" />
            </td>
        </tr>
    </table>
    <table style="width: 100%;" cellpadding="2" cellspacing="0" class="workspacesearch">
        <tr>
            <td class="dt" align="center">
                查询条件
            </td>
            <td style="width: 80px" align="center" class="tdbg">
                <b>表单名称：</b>
            </td>
            <td class="tdbg">
                <select id="txtSearchFormName" class="easyui-combobox" name="state" style="width: 200px;">
                </select>
            </td>
            <td style="width: 80px" align="center" class="tdbg">
            <input id="hiddenSearchName" type="hidden" runat="server" />
            </td>
            <td class="tdbg">
            </td>
            <td class="tdbg">
                <asp:ImageButton ID="imgBtnSearch" ImageUrl="/Themes/TheOne/images/btn_search.gif"
                    runat="server" OnClick="btnSearch_Click" OnClientClick="CheckFormContent();" />
            </td>
        </tr>
    </table>
    <table width="100%" cellpadding="0" cellspacing="0" border="0" class="formList">
        <tr>
            <td>
                <!--Search end-->
                <table height="220px" border="0" width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <td valign="top" height="200px">
                            <asp:GridView ID="gridView" runat="server" AllowPaging="True" Width="100%" CellPadding="4"
                                OnPageIndexChanging="gridView_PageIndexChanging" DataKeyNames="FileFormId" OnRowDataBound="gridView_RowDataBound"
                                AutoGenerateColumns="False" RowStyle-HorizontalAlign="Center" OnRowCreated="gridView_OnRowCreated"
                                ForeColor="#333333" OnRowDeleting="gridView_RowDeleting">
                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                <Columns>
                                    <asp:TemplateField ControlStyle-Width="30" HeaderText="选择" Visible="false">
                                        <ItemTemplate>
                                            <asp:CheckBox ID="checkboxname" name="checkboxname" onclick="javascript:SingleCheckJs();"
                                                runat="server" />
                                        </ItemTemplate>
                                        <ControlStyle Width="30px"></ControlStyle>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="表单清单" SortExpression="FormName">
                                        <ItemTemplate>
                                                <%#Eval("FormName")%>
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="文件预览">
                                        <ItemTemplate>
                                            <%#Eval("FileFolder") == "" ? "暂无文件" : "<a href='/Uploads/" + Eval("FileFolder") + "/" + Eval("FileSaveName") + "'>预览</a>"%>
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:TemplateField>
                                    <asp:TemplateField ControlStyle-Width="50" HeaderText="删除">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="LinkButton1" runat="server" BindData='<%#Eval("CreateUserId") %>'
                                                CausesValidation="False" CommandName="Delete" Text="删除"></asp:LinkButton>
                                        </ItemTemplate>
                                        <ControlStyle Width="50px"></ControlStyle>
                                    </asp:TemplateField>
                                </Columns>
                                <EditRowStyle BackColor="#999999" />
                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <HeaderStyle BackColor="#598cbf" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                <RowStyle HorizontalAlign="Center" BackColor="#F7F6F3" ForeColor="#333333"></RowStyle>
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                            </asp:GridView>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" CssClass=""
                                FirstPageText="首页" HorizontalAlign="Right" LastPageText="末页" NextPageText="下一页"
                                PageIndexBoxType="TextBox" PrevPageText="上一页" ShowCustomInfoSection="Left" ShowInputBox="Always"
                                ShowPageIndexBox="Always" OnPageChanged="AspNetPager1_PageChanged" PageSize="6">
                            </webdiyer:AspNetPager>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
